package bluejack.operation;

/**
 * ...
 * @author BlueJack
 */

class FunctionOper extends Oper
{
	private var func:Dynamic;
	private var para:Array<Dynamic>;
	private var caller:Dynamic;

	public function new(func:Dynamic,para:Array<Dynamic>=null,caller:Dynamic=null) {
		super();
		this.func = func;
		this.para = para;
		this.caller = caller;
	}
	
	override public function execute():Void {
		super.execute();
		Reflect.callMethod(caller, func, para);
		result();
	}
}